package com.bwie.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bwie.enums.SuatusEnums;
import com.bwie.utils.R;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @description: 商品实体类
 * @author: xushuaihang
 * @Date: 2024/6/17 9:51
 * @param:
 * @param
 * @return:
**/
@Data
@TableName("product")
public class Product implements Serializable {

    @TableId(type = IdType.AUTO)
   private Integer id;  //ID

   private String productName; //商品名称

   private Double productPrice; //商品价格

   private Integer productInventory; //商品库存

   private String productDetails; //商品描述

   private Integer sortId; //类型ID

   private SuatusEnums productStatus; //商品状态

   @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
   private Date createTime;  //发布时间

   @TableField(exist = false)
   public List<ProductImg> imgList;

   @TableField(exist = false)
   public ProductType productType;





}
